package com.iptv.grape.domain;

import com.iptv.grape.bu.GrapeContext;
import com.iptv.grape.util.CommUtil;

import java.util.List;

// ListView样式类
public class ListViewStyle {
    // 容器的宽度
    private int width;
    // ViewItem 的布局文件
    private String layoutFileName;
    // 数据类型
    private String dataType;
    // 屏幕上最大显示多少个
    private int maxItemsInOneScreen;
    // 初始焦点的位置
    private int initFocus;
    // 焦点的滚动位置
    private int selection;
    // 焦点Image的高度
    private int imageHeigth;
    // image的背景颜色
    private String backgroundColor;

    public String getBackgroundColor() {
        return backgroundColor;
    }

    public int getSelection() {
        return selection;
    }

    public void setSelection(int selection) {
        this.selection = selection;
    }

    public int getMaxItemsInOneScreen() {
        return maxItemsInOneScreen;
    }

    public void setMaxItemsInOneScreen(int maxItemsInOneScreen) {
        this.maxItemsInOneScreen = maxItemsInOneScreen;
    }

    public int getInitFocus() {
        return initFocus;
    }

    public void setInitFocus(int initFocus) {
        this.initFocus = initFocus;
    }

    public int getImageHeigth() {
        return imageHeigth;
    }

    public ListViewStyle(int width, String layoutFileName, String dataType, int maxItemsInOneScreen,
                         int initFocus, int selection, int imageHeigth,String backgroundColor) {

        this.width = CommUtil.dip2px(GrapeContext.curGrapeContext().getCurActivity(),width);

        //this.width = width;
        this.layoutFileName = layoutFileName;
        this.dataType = dataType;
        this.maxItemsInOneScreen = maxItemsInOneScreen;
        this.initFocus = initFocus;
        this.selection = selection;
        //this.imageHeigth = imageHeigth;
        this.imageHeigth = CommUtil.dip2px(GrapeContext.curGrapeContext().getCurActivity(),imageHeigth);
        this.backgroundColor = backgroundColor;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public String getLayoutFileName() {
        return layoutFileName;
    }

    public void setLayoutFileName(String layoutFileName) {
        this.layoutFileName = layoutFileName;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }
}
